home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc2_x / tcprogud.sit / TC Prog Guide / card_38674.txt < prev    next >
Text File  |  1991-02-27  |  687b  |  32 lines

  1. -- card: 38674 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 4755
  5. -- name: 
  6.  
  7.  
  8. -- part contents for background part 4
  9. ----- text -----
  10. to call the Student::set() method.  In order to override the method we must redeclare it in the definition of the Student class:
  11.  
  12.     struct  Student:Person
  13.     {
  14.         int    student_num; 
  15.         
  16.         int       init(void);       /* override inherited init() method */
  17.         void    set(void);     
  18.         void    print(void); 
  19.     };
  20.  
  21.     int    Student::init(void)
  22.     {
  23.         set();             /* call Student's set() method */
  24.         return 1;
  25.     }
  26.  
  27.  
  28.  
  29.  
  30. -- part contents for background part 7
  31. ----- text -----
  32. 117